/**
 * Created by pactera on 2018/5/16.
 */


var vue = new Vue({
    el: '#app',
    data:{
        main:'views/menu.html',
        itemName:'',
        menuName:"",
        menuData:'',
    },
    mounted: function () {
        var _this = this;
        $.get("/menu/tree", function(r){
            _this.menuData = r.data;
        });

    },

    methods:{
        forwardToItem : function (menu,item) {
            this.main=menu.url;
            this.itemName = item.label;
            this.menuName = menu.label;
        }
    }
})